package cn.com.chengmandian.bike.service.impl;

import cn.com.chengmandian.bike.mapper.EbDepositCardMapper;
import cn.com.chengmandian.bike.model.EbDepositCard;
import cn.com.chengmandian.bike.service.IEbDepositCardService;
import cn.com.chengmandian.core.common.constants.CommonConstant;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 电单车运营-免押会员配置 服务实现类
 * </p>
 *
 * @author AutoGenerator
 * @since 2022-01-19
 */
@Service
public class EbDepositCardServiceImpl extends ServiceImpl<EbDepositCardMapper, EbDepositCard> implements IEbDepositCardService {

    @Override
    public List<EbDepositCard> getCardList(Integer areaId) {
        return this.list(new LambdaQueryWrapper<EbDepositCard>()
                .eq(EbDepositCard::getIsEnabled, CommonConstant.ONE)
                .eq(EbDepositCard::getIsDeleted, CommonConstant.ZERO)
                .eq(EbDepositCard::getAreaId, areaId)
                .orderByAsc(EbDepositCard::getSort));
    }
}
